Functional layers & Models in Unix

Ratings:
(4)
Views: 700
Banner-Img
Share this blog:

Levels of Unix Software

  • Unix users a layer approach of defining software layered approach is basis for Unix Security.
  • At the lowest level, the level closest to the hardware, are the basic hardware interface modules
    • process scheduling
    • Memory management
    • interrupt handling
    • low level device control
    • disk system management & data buffering
    • process synchronization and inter – process communication ( 1pc)

 

Unix Functional layer Model

    2    

Kernel Service layer

  UntitledFile / disk access service Untitledprocess creation and termination UntitledMapping between user requests and device driver actions. UntitledThe next level provides all the kernel services UntitledThe user system call is converted to a Kernel service call that actually  performs  the requests service UntitledI/O service UntitledTerminal handling services  

System call Interface Layer

  UntitledThe system call interface layer converts a process running in user mode to a protected kernel mode process.   UntitledThis allows the program to invoke protected kernel routines to perform system functions.  

User process Layer 

The uppermost layer consists of user process running :

  • shell
  • Unix commands
  • Utility programs
  • User application program

 

  User process

*protected from other users *Have no access to Unix Kernel routines except through system call interface *cannot directly access Kernel memory space.  

Kernel   VS User space

Untitled  In addition to the software levels, Unix also features two  “rings of protection ” from inadvertent programming errors or malisons attacks   that might damage other user’s processes  or the kernel’s processes and data structures. UntitledThe inner protected ring is known as kernel space UntitledThe outer ring is called user space.     

User Space

UntitledUser space is the area in memory  when user process are run UntitledThis consist of memory starting above the kernel and includes the4 rest of available memory. UntitledThis memory is protected ; the system prevents one user from interfering with another. UntitledOnly Kernel process can access a user process. UntitledA process operating in this memory region is said to be in user mode.  

Kernel Space

UntitledKernel space is the region at memory where all kernel service are provided via kernel process. UntitledAny process executing in kernel space is said to be executing in kernel mode. UntitledKernel Space is a privileged area ; the area the user has access to it only through the system call interface. UntitledA user does not have direct access to either all machine instructions or devices. UntitledA kernel process does have direct access to both. UntitledAlso, a kernel process can modify the memory map, an operation frequently required to perform process scheduling. UntitledA user process becomes a kernel process when it executes a system call and starts executes kernel code.  

Data Flow Between Kernel and user Space

  UntitledSince users and the kernel do not share memory address space , the mechanism for moving data between them is important. UntitledWhen a system call is executed , the arguments to the call and the corresponding kernel routine  identification are passed from user space to kernel space. UntitledKernel routine ID is usually passed either via a hardware machine register or via the stack. UntitledSystem call arguments are passed in the user area of the calling process. UntitledUser area of a process contains information a bout the process the Kernel needs while the process is running. UntitledOpen files , root, current directory, arguments to current system call , and process text, stack and data segment sizes. UntitledA pointer to the process table entry containing information for scheduling such as priority. UntitledUser file descriptor table and information about open files. UntitledKernel Stack for the process. UntitledRemember , user can not access Kernel space but Kernel space can access user space.      

You liked the article?

Like: 0

Vote for difficulty

Current difficulty (Avg): Medium

EasyMediumHardDifficultExpert
IMPROVE ARTICLEReport Issue

About Author

Authorlogo
Name
TekSlate
Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.

Stay Updated
Get stories of change makers and innovators from the startup ecosystem in your inbox